const app = getApp(); //引入自定义头部导航

import { OpinionList } from 'opinionList_model.js';

var time = require('../../utils/utils.js'); // 引入时间戳转换时间


var opinionList = new OpinionList();
var my = true;
Page({
  data: {
    showIcon: true //显示返回键以及首页

  },
  onLoad: function () {
    opinionList.getfankuilist(res => {
      if (res == '') {
        my = false;
      }

      for (var i = 0; i < res.length; i++) {
        var settime = time.formatTimeTwo(res[i]['settime'], 'Y-m-d'); //时间戳转换成时间

        var handletime = time.formatTimeTwo(res[i]['handletime'], 'Y-m-d'); //时间戳转换成时间

        this.setData({
          res: res,
          my: my,
          settime: settime,
          handletime: handletime
        });
      }
    });
  },
  //分享
  onShareAppMessage: function () {
    util.sharePage();
  }
});